package org.example.adapter.classadapter;

import org.springframework.stereotype.Component;

/**
 * @author
 * @description 适配类
 */
@Component
public class VoltageAdapter extends Voltage220V implements IVoltage5V{
    //转换过程
    @Override
    public int output5V() {
        int srcV = output220V(); //获取被适配器者的电压
        int dstV = srcV / 44;//转换过程 5V
        return dstV;
    }
}
